<?php
/**
 * @package		Joomla.Site
 * @subpackage	mod_menu
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access.
defined('_JEXEC') or die;
	$app = JFactory::getApplication();
	$templatepath = JURI::base() . 'templates/' . $app->getTemplate();
// Note. It is important to remove spaces between elements.
?>

<ul id="lstNav">
<?php
foreach ($list as $i => &$item) :
	$class = 'item-'.$item->id;
	if ($item->id == $active_id) {
		$class .= ' current';
	}

	if (in_array($item->id, $path)) {
		$class .= ' active';
	}
	elseif ($item->type == 'alias') {
		$aliasToId = $item->params->get('aliasoptions');
		if (count($path) > 0 && $aliasToId == $path[count($path)-1]) {
			$class .= ' active';
		}
		elseif (in_array($aliasToId, $path)) {
			$class .= ' alias-parent-active';
		}
	}

	if ($item->deeper) {
		$class .= ' deeper';
	}

	if ($item->parent) {
		$class .= ' hasSub';
	}

	if (!empty($class)) {
		$class = ' class="'.trim($class) .'"';
	}

	echo '<li'.$class.'>';

	// Render the menu item.
	switch ($item->type) :
		case 'separator':
		case 'url':
		case 'component':
			require JModuleHelper::getLayoutPath('mod_menu', 'default_'.$item->type);
			break;

		default:
			require JModuleHelper::getLayoutPath('mod_menu', 'default_url');
			break;
	endswitch;

	// The next item is deeper.
	if ($item->deeper) {
		echo '<ul class="submenu-'.$item->level.'">';
	}
	// The next item is shallower.
	elseif ($item->shallower) {
		echo '</li>';
		echo str_repeat('</ul></li>', $item->level_diff);
	}
	// The next item is on the same level.
	else {
		echo '</li>';
	}
endforeach;
?></ul>

<?php return; ?>
<ul id="lstNav">
<li>
	<a class="active" href="about.php">Om os</a>
	<ul class="submenu-1">
		<li>
			<a class="hasSub" href="gallery.php">Galleri</a>
			<ul class="submenu-2">
				<li><a href="gal-detail.php">Daltoftevej</a></li>
				<li><a href="gal-detail.php">Rørholmsgade</a></li>
				<li><a href="gal-detail.php">Ryparken</a></li>
				<li><a href="gal-detail.php">Højbjerg Vænge</a></li>
				<li><a href="gal-detail.php">Røde Møllegård.</a></li>
				<li><a href="gal-detail.php">Mølle Bakken</a></li>
				<li><a href="gal-detail.php">Stenløse</a></li>
				<li><a href="gal-detail.php">A/B Nordrefrihavnsgade 80</a></li>
				<li><a href="gal-detail.php">Dronningegården</a></li>
				<li><a href="gal-detail.php">Snedker værkstedet</a></li>
			</ul>
		</li>
		<li><a href="reference.php">Reference</a></li>
	</ul>
</li>
<li><a href="contact.php">Kontakt</a></li>
<li><a href="perform.php">Vi udføre</a></li>
<li><a href="construction.php">Dansk Byggeri</a></li>
<li><a href="energy.php">Energivejleren</a></li>
<li><a href="news.php">Nyt tag</a></li>
<li><a href="insulation.php">Isolerings afd</a></li>
<li><a href="service.php">Service afd</a></li>
<li><a href="contract.php">Entrepriser afd</a></li>
</ul>

